import { $get } from '@js/request'
import { ArbitratorSchema } from '@src/components/schema/arbitrator';
import { CaseSchema, OtherPersonSchema } from '@src/components/schema/caseSchema';

// 获取案件信息
export async function getCaseDetailRequest (id: string): Promise<CaseSchema> {
  const res = await $get(`/api/commission/case/${id}`)
  return res.data
}

export async function getOthersRequest (caseid: string): Promise<OtherPersonSchema[]> {
  const res = await $get('/api/commission/participant', {
    caseid
  })
  return res.data
}

export async function getArbitratorsRequest (id: string): Promise<ArbitratorSchema[]> {
  const res = await $get(`/api/commission/case/${id}/arbitrator`)
  return res.data
}
